package com.gongpingjialoan.activity.tool;

import java.util.Map;

import com.gongpingjialoan.R;
import com.gongpingjialoan.activity.main.BaseActivity;

import android.content.Intent;
import android.os.Bundle;
import android.widget.TextView;
/**
 * 车辆出险记录查询详情界面     wang
 * @author Administrator
 *
 */
public class InsuranceRecordDetailActivity extends BaseActivity
{
    
    private Map<String, String> record;
    
    private TextView reportDate;
    
    private TextView startDate;
    
    private TextView operateDate;
    
    private TextView endDate;
    
    private TextView claimQueryNo;
    
    private TextView claimStatus;
    
    private TextView licenseNo;
    
    private TextView sumPaid;
    
    private TextView estimateLoss;
    
    private TextView cliamDate;
    
    private TextView endCaseDate;
    
    private TextView damageDate;
    
    private TextView companyCode;
    
    private TextView policyNo;
    
    private TextView riskType;
    
    private TextView driverName;
    
    private TextView IndemnityDuty;
    
    @SuppressWarnings("unchecked")
    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_insurance_record_detail);
        
        initBase(this);
        
        Intent intent = getIntent();
        Bundle bundle = intent.getExtras();
        record = (Map<String, String>)bundle.get("record");
        getViews();
        setTexts();
        
    }
    
    private void getViews()
    {
        setTitle("出险记录查询");
        reportDate = (TextView)findViewById(R.id.report_date);
        startDate = (TextView)findViewById(R.id.start_date);
        operateDate = (TextView)findViewById(R.id.operate_date);
        endDate = (TextView)findViewById(R.id.end_date);
        claimQueryNo = (TextView)findViewById(R.id.claim_query_no);
        claimStatus = (TextView)findViewById(R.id.claim_status);
        licenseNo = (TextView)findViewById(R.id.license_no);
        estimateLoss = (TextView)findViewById(R.id.estimated_loss);
        sumPaid = (TextView)findViewById(R.id.sum_paid);
        cliamDate = (TextView)findViewById(R.id.claim_date);
        endCaseDate = (TextView)findViewById(R.id.end_case_date);
        damageDate = (TextView)findViewById(R.id.damage_date);
        companyCode = (TextView)findViewById(R.id.company_code);
        policyNo = (TextView)findViewById(R.id.policy_no);
        riskType = (TextView)findViewById(R.id.risk_type);
        driverName = (TextView)findViewById(R.id.driver_name);
        reportDate = (TextView)findViewById(R.id.report_date);
        IndemnityDuty = (TextView)findViewById(R.id.IndemnityDuty);
    }
    
    private void setTexts()
    {
        reportDate.setText(record.get("ReportDate"));
        startDate.setText(record.get("StartDate"));
        operateDate.setText(record.get("OperateDate"));
        endDate.setText(record.get("EndDate"));
        claimQueryNo.setText(record.get("ClaimQueryNo"));
        claimStatus.setText(record.get("ClaimStatus"));
        licenseNo.setText(record.get("LicenseNo"));
        estimateLoss.setText(record.get("EstimateLoss"));
        sumPaid.setText(record.get("SumPaid"));
        cliamDate.setText(record.get("ClaimDate"));
        endCaseDate.setText(record.get("EndcaseDate"));
        damageDate.setText(record.get("DamageDate"));
        companyCode.setText(record.get("CompanyCode"));
        policyNo.setText(record.get("PolicyNo"));
        riskType.setText(record.get("RiskType"));
        driverName.setText(record.get("DriverName"));
        reportDate.setText(record.get("ReportDate"));
        IndemnityDuty.setText(record.get("IndemnityDuty"));
        
    }
    
}
